package jse.io.filter;

import java.io.File;
import java.io.FilenameFilter;
import java.util.logging.Filter;

/**
 * @desc 文件类型过滤器
 *
 * @author kanggw
 * @create 2016 08 11 11:10
 */
public class DirFilter implements FilenameFilter{
    public static String extension;

    public DirFilter() {
    }

    public DirFilter(String extension) {
        this.extension = extension;
    }

    @Override
    public boolean accept(File dir, String name) {

        return name.endsWith(extension);
    }
}
